import request from '@/utils/request';

let { VUE_APP_ADMIN_API ,VUE_APP_ADMIN_API1} = process.env;

// /获取大屏展示信息
export let CompanyMainPageInfo = data => request.get(`${VUE_APP_ADMIN_API}/ssa/supervise/unit/findSuperviseunitHeadList`, data, { loading: true });
export let groupArea = data => request.get(`${VUE_APP_ADMIN_API}/area/group`, data);
export let viseUnitListSuper = data => request.post(`${VUE_APP_ADMIN_API}/ssa/supervise/unit/find-ssa-super-viseunit-list-new`, data, { loading: true });

// 导出
export let exportqueryPeopleInfoNew = data => request.get(`${VUE_APP_ADMIN_API}/ssa/supervise/unit/exportqueryPeopleInfoNew`, { params: data, isAuth: true, loading: true, responseType: "blob" });




export let findByBodyIndustry = data => request.post(`${VUE_APP_ADMIN_API}/unit/body/industry/findUnitBodyIndustryList`, data, { loading: true });
export let QueryUnitTraningRecordList = data => request.post(`${VUE_APP_ADMIN_API}/unit/training/record/QueryUnitTraningRecordList`, data);
export let QueryEtterCommitmentList = data => request.post(`${VUE_APP_ADMIN_API}/etter/commitment/QueryEtterCommitmentList`, data);
// 自查
export let findUnitCheckResultListNew = data => request.post(`${VUE_APP_ADMIN_API}/unit/check/result/findUnitCheckResultListNew`, data);
// 针对性自查
export let findPertinenceInspectList = data => request.post(`${VUE_APP_ADMIN_API}/pertinence/inspect/findPertinenceInspectList`, data);
//查看自查详情
export let findUnitCheckResultInfoById = data => request.post(`${VUE_APP_ADMIN_API}/unit/check/result/findUnitCheckResultInfoById`, data);
//自查报告
export let QueryselfExaminationReportList = data => request.post(`${VUE_APP_ADMIN_API}/self/examination/report/QueryselfExaminationReportList`, data);
// 食安制度
export let QueryfoodSafetySystemList = data => request.post(`${VUE_APP_ADMIN_API}/food/safety/system/QueryfoodSafetySystemList`, data);
// 菜谱类型
export let QueryUnitRecipeList = data => request.post(`${VUE_APP_ADMIN_API}/unit/recipe/QueryUnitRecipeList`, data);
// 食谱
export let queryUnitMealTimeList = data => request.post(`${VUE_APP_ADMIN_API}/unit/meal/time/queryUnitMealTimeList`, data);
// 陪餐
export let QueryUnitAccoumpanyToEatList = data => request.post(`${VUE_APP_ADMIN_API}/unit/accompany/to/eat/QueryUnitAccoumpanyToEatList`, data);
// 人员列表
export let findCompanyPersonnelInfolist = data => request.post(`${VUE_APP_ADMIN_API}/login/unit/findCompanyPersonnelInfolist`, data);
// 人员列表详情
export let queryPeopleInfo = data => request.post(`${VUE_APP_ADMIN_API}/login/unit/queryPeopleInfo`, data);
// 获取人员分组
// export  let findGroupingList= data => request.post(`${VUE_APP_ADMIN_API}/login/unit/findGroupingList`, data);
// 废弃物处理
export let QueryunitWasteHandleList = data => request.post(`${VUE_APP_ADMIN_API}/unit/waste/handle/QueryunitWasteHandleList`, data);
// 餐具消毒
export let QueryunitTablewareDisinList = data => request.post(`${VUE_APP_ADMIN_API}/unit/tableware/disin/QueryunitTablewareDisinList`, data);
// 晨检
export let queryUnitMorningCheck = data => request.post(`${VUE_APP_ADMIN_API}/unit/morning/check/queryUnitMorningCheck`, data);
// 食谱
export let QueryUnitSampleList = data => request.post(`${VUE_APP_ADMIN_API}/unit/sample/QueryUnitSampleList`, data);
// 日历


export let findState = data => request.post(`${VUE_APP_ADMIN_API}/ssa/supervise/unit/findState`, data);
// 索证索票
export let findCertificateAndTicketList = data => request.post(`${VUE_APP_ADMIN_API}/purchase/bill/findCertificateAndTicketList`, data, { loading: true });
//  /purchase/bill/findListByCondition
//获取索证索票详情
export let findCertificateAndTicketById = data => request.post(`${VUE_APP_ADMIN_API}/purchase/bill/findCertificateAndTicketById`, data);

//获取索证索票快检详情
export let jcFindListByCondition = data => request.post(`${VUE_APP_ADMIN_API}/ssa/quick/check/item/jc/findListByCondition`, data);


//获取索证索票检测报告详情
export let findTestReportAndPurchasingDocuments = data => request.post(`${VUE_APP_ADMIN_API}/ssa/quick/check/item/jc/findTestReportAndPurchasingDocuments`, data);





//获取食品抽检
export let findLegalExamination = data => request.post(`${VUE_APP_ADMIN_API}/fj/sample/findLegalExamination`, data);

//获日常监督
export let findDailySupervision = data => request.post(`${VUE_APP_ADMIN_API}/ssa/rcjd/dailyCheckResult/findDailySupervision`, data);

//获取负面因素
export let findDeductionList = data => request.post(`${VUE_APP_ADMIN_API}/negative/factors/score/findDeductionList`, data);



export let SsaQuickCheck = data => request.post(`${VUE_APP_ADMIN_API}/ssa/quick/check/item/jc/quickUnitList`, data);

export let sysDicUnitLabel = data => request.get(`${VUE_APP_ADMIN_API}/ssa/superViseUnit/label/sysDicUnitLabel`, data);

//  export  let saveSuperViseUnitLabel= data => request.post(`${VUE_APP_ADMIN_API}/ssa/superViseUnit/label/saveSuperViseUnitLabel`, data);

export let findPeopleType = data => request.post(`${VUE_APP_ADMIN_API}/ssa/responsibility/findPeopleType`, data);

export let getPdfResponsibilityRecord = data => request.get(`${VUE_APP_ADMIN_API}/ssa/responsibility/getPdfResponsibilityRecord`, data);


export let findLabelList = data => request.post(`${VUE_APP_ADMIN_API}/ssa/supervise/unit/findLabelList`, data, { loading: true });


//  export  let saveBackGround= data => request.post(`${VUE_APP_ADMIN_API}/ssa/back/ground/saveBackGround`, data);

export let saveSuperViseUnitLabel = data => request.post(`${VUE_APP_ADMIN_API}/ssa/superViseUnit/label/saveSuperViseUnitLabel`, data);

export let findDailyControl = data => request.post(`${VUE_APP_ADMIN_API}/daily/control/result/findDailyControl`, data);


export let findDailyControlList = data => request.post(`${VUE_APP_ADMIN_API}/chain/control/result/findDailyControlList`, data);



export let findByIdDailyControl = data => request.post(`${VUE_APP_ADMIN_API}/daily/control/result/findByIdDailyControl`, data, { loading: true });


export let findByIdDailyControlCopy = data => request.post(`${VUE_APP_ADMIN_API}/chain/control/result/findByIdDailyControl`, data, { loading: true });




export let findControlRectification = data => request.post(`${VUE_APP_ADMIN_API}/daily/control/result/findControlRectification`, data, { loading: true });



export let findControlRectificationCopy = data => request.post(`${VUE_APP_ADMIN_API}/chain/control/result/findControlRectification`, data, { loading: true });









export let findWeeklyScreeningResult = data => request.post(`${VUE_APP_ADMIN_API}/daily/control/result/findWeeklyScreeningResult`, data, { loading: true });



export let findWeeklyScreeningResultCopy = data => request.post(`${VUE_APP_ADMIN_API}/chain/control/result/findWeeklyScreeningResult`, data, { loading: true });



export let updateSuperViseUnitLabel = data => request.post(`${VUE_APP_ADMIN_API}/ssa/superViseUnit/label/updateSuperViseUnitLabel`, data, { loading: true });

export let findMonthlyScreeningResult = data => request.post(`${VUE_APP_ADMIN_API}/daily/control/result/findMonthlyScreeningResult`, data, { loading: true });


export let findMonthlyScreeningResultCopy = data => request.post(`${VUE_APP_ADMIN_API}/chain/control/result/findMonthlyScreeningResult`, data, { loading: true });


export let mainResponsibilityStatistics = data => request.post(`${VUE_APP_ADMIN_API}/ssa/superViseUnit/label/mainResponsibilityStatistics`, data, { loading: true });
export let findTenderList = data => request.post(`${VUE_APP_ADMIN_API}/tender/findTenderList`, data, { loading: true });
// export let findTenderList = data => request.post(`${VUE_APP_ADMIN_API}/tender/findTenderList`, data, { loading: true });

export let findTenderById=(data) => request.get(`${VUE_APP_ADMIN_API}/tender/findTenderById`, data)
export let updateTenderStateById=(data) => request.get(`${VUE_APP_ADMIN_API}/tender/updateTenderStateById`, data)



export let SunshineCanteenRecordList=(data) => request.post(`${VUE_APP_ADMIN_API}/sunshine/canteen/record/SunshineCanteenRecordList`, data)




// export  let findControlRectificationItem= data => request.post(`${VUE_APP_ADMIN_API}/daily/control/result/findControlRectification`, data);


export let findSupplierPromotionForm = data => request.post(`${VUE_APP_ADMIN_API}/supplierPromotionForm/findSupplierPromotionForm`, data, { loading: true });


export let saveSupplierPromotionForm = data => request.post(`${VUE_APP_ADMIN_API}/supplierPromotionForm/saveSupplierPromotionForm`, data, { loading: true });


export let deletesupplierPromotionForm = data => request.get(`${VUE_APP_ADMIN_API}/supplierPromotionForm/deletesupplierPromotionForm`, data, { loading: true });


export let supplierPromotionFormList = data => request.get(`${VUE_APP_ADMIN_API}/supplierPromotionForm/supplierPromotionFormList`, data, { loading: true });

export let landSupplierPromotionForm = data => request.get(`${VUE_APP_ADMIN_API}/supplierPromotionForm/landSupplierPromotionForm`, data, { loading: true });


export let findSuperViseUnitDealtList = data => request.post(`${VUE_APP_ADMIN_API}/ssa/supervise/unit/findSuperViseUnitDealtList`, data, { loading: true });



export let saveDealtSuperViseUnitLabel = data => request.post(`${VUE_APP_ADMIN_API}/ssa/superViseUnit/label/saveDealtSuperViseUnitLabel`, data, { loading: true });

//移除待办
export let saveDealtSuperViseUnitLabel2 = data => request.post(`${VUE_APP_ADMIN_API}/ssa/superViseUnit/label/removeAgent`, data, { loading: true });

export let exportSuperViseUnitDeal = data => request.get(`${VUE_APP_ADMIN_API}/ssa/supervise/unit/exportSuperViseUnitDeal`, { params: data, isAuth: true, loading: true, responseType: "blob" });



export let directorEnterpriseReplacement = data => request.post(`${VUE_APP_ADMIN_API}/ssa/superViseUnit/label/directorEnterpriseReplacement`, data, { loading: true });

//统计分析（监管端）//落实情况分析统计
export let implementationAnalysisStatistics = data => request.post(`${VUE_APP_ADMIN_API}/ssa/superViseUnit/label/implementationAnalysisStatistics`, data, { loading: true });

//风险列表
export let getRiskItemList = data => request.post(`${VUE_APP_ADMIN_API}/ssa/superViseUnit/label/riskItemList`, data, { loading: true });

export let changeRecordList = data => request.post(`${VUE_APP_ADMIN_API}/unit/update/record/p/c/changeRecordList`, data);


export let analyzeBulletBoxes = data => request.post(`${VUE_APP_ADMIN_API}/ssa/superViseUnit/label/analyzeBulletBoxes`, data, { loading: true });


export let exportAnalyzeBulletBoxes = data => request.get(`${VUE_APP_ADMIN_API}/ssa/superViseUnit/label/exportAnalyzeBulletBoxes`,{ params: data, isAuth: true, loading: true, responseType: "blob" });



export let GetHistory = data => request.post(`https://spaq.suzhou.gov.cn/ssa-api/ncp/api/SsaQuickCheck`,data,{loading: true});


export let abnormalStateUnit = data => request.post(`${VUE_APP_ADMIN_API}/ssa/supervise/unit/abnormalStateUnit`,data,{loading: true});
export let exportAbnormalStateUnit = data => request.get(`${VUE_APP_ADMIN_API}/ssa/supervise/unit/exportAbnormalStateUnit`,{ params: data, isAuth: true, loading: true, responseType: "blob" });

export  let findListByCategory= data => request.get(`${VUE_APP_ADMIN_API}/ssa/sysDic/findListByCategory`, data);
export  let findCanteenManage= data => request.get(`${VUE_APP_ADMIN_API}/canteenManage/findCanteenManage`, data,{loading:true});

export  let saveCanteenManage= data => request.post(`${VUE_APP_ADMIN_API}/canteenManage/updateCanteenManage`, data,{loading:true});





export  let findCanteenManageList= data => request.post(`${VUE_APP_ADMIN_API}/canteenManage/findCanteenManageList`, data,{loading:true});
export  let exportCanteenManageList= data => request.get(`${VUE_APP_ADMIN_API}/canteenManage/exportCanteenManageList`,{ params: data, isAuth: true, loading: true, responseType: "blob" });

export  let canteenManageStatistics= data => request.get(`${VUE_APP_ADMIN_API}/canteenManage/canteenManageStatistics`, data,{loading:true});
export  let findListByCondition= data => request.post(`${VUE_APP_ADMIN_API}/school/findListByCondition`, data);
export  let business= data => request.post(`${VUE_APP_ADMIN_API}/school/other/business/findListByCondition`, data);
export  let food= data => request.post(`${VUE_APP_ADMIN_API}/school/serve/food/findSchoolServeFood`, data);
export  let delivery= data => request.post(`${VUE_APP_ADMIN_API}/school/food/delivery/findSchoolFoodDelivery`, data);
export  let prepackaged= data => request.post(`${VUE_APP_ADMIN_API}/school/prepackaged/food/findListByCondition`, data);
export  let findById= data => request.get(`${VUE_APP_ADMIN_API}/school/findById`, data);
export  let canteen= data => request.post(`${VUE_APP_ADMIN_API}/school/canteen/findListByCondition`, data);
export  let findByIdCanteen= data => request.get(`${VUE_APP_ADMIN_API}/school/canteen/findById`, data);
export  let findSysDicBusiness= data => request.get(`${VUE_APP_ADMIN_API}/sys/dic/business/findSysDicBusiness`, data);

export  let findRisksLevelStatistics= data => request.post(`${VUE_APP_ADMIN_API}/ssa/superViseUnit/label/findRisksLevelStatistics`, data,{loading:true});





export let findVideoSnapped = (data) =>
	    request.post(`${VUE_APP_ADMIN_API1}/video/snapped/findVideoSnapped`, data);
	
	export let findVideoSnappedById = (data) =>
	    request.get(
	        `${VUE_APP_ADMIN_API1}/video/snapped/findVideoSnappedById`,
	        data,
	    );
	
	export let findPersonPassRecord = (data) =>
	    request.post(
	        `${VUE_APP_ADMIN_API1}/person/pass/record/findPersonPassRecord`,
	        data,
	    );
	



//企业信用档案列表
export function getCreditFile(data) {
	return request({
		url: "http://58.211.227.180:9005/rcjd-api/superviseunitbase/list/creditFileZJG",
		method: "post",
		data,
		loading: true,
	});
}

export  let licenseAcquisitionId= data => request.get(`${VUE_APP_ADMIN_API}/data/synchronization/licenseAcquisitionId`, data);
